import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopDecorateContentController } from '../../../controllers';
const uctoominishopDecorateContentRouter = new Router();
const minishopDecorateContentController = new uctooMinishopDecorateContentController();

uctoominishopDecorateContentRouter.post('/add', requireUser, minishopDecorateContentController.add);
uctoominishopDecorateContentRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_decorate_content'), minishopDecorateContentController.edit);
uctoominishopDecorateContentRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_decorate_content'), minishopDecorateContentController.delete);

//For getting minishopDecorateContent with permission control
uctoominishopDecorateContentRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_decorate_content'), minishopDecorateContentController.getSingle);
uctoominishopDecorateContentRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_decorate_content'), minishopDecorateContentController.getMany);
uctoominishopDecorateContentRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_decorate_content'), minishopDecorateContentController.getMany);

//#endregion AutoCreateCode
export default uctoominishopDecorateContentRouter;
